from cv2 import cv2
import numpy as np
img0 = cv2.imread('example/IMG_1126.JPG')
hsv_img = cv2.cvtColor(img0, cv2.COLOR_BGR2HSV)
h,s,v = cv2.split(hsv_img) #OpenCV给出的范围

'''转换为计算公式给出的范围'''
H = h.astype(np.float)*2
S = s.astype(np.float)/255
V = v.astype(np.float)/255
print(H,S,V)
